package com.mdd.system.provider;

import com.mdd.system.api.ConfigApi;
import com.mdd.system.utils.ConfigUtils;
import org.springframework.stereotype.Service;
import java.util.Map;

/**
 * @Description
 * @Author 幻速
 * @Date 2024/3/19 13:14
 **/
import com.mdd.common.validator.annotation.IntegerContains;
import com.mdd.common.validator.annotation.IntegerContains;
@Service("configApi")
public class ConfigApiProvider implements ConfigApi {
    @Override
    public Map<String, String> get(String type) {
        return ConfigUtils.get(type);
    }

    @Override
    public String get(String type, String name) {
        return get(type, name,"");
    }

    @Override
    public String get(String type, String name, String defaults) {
        return ConfigUtils.get(type, name, defaults);
    }

    @Override
    public Map<String, String> getMap(String type, String name) {
        return ConfigUtils.getMap(type, name);
    }

    @Override
    public void set(String type, String name, String val) {
        ConfigUtils.set(type, name, val);
    }
}
